<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>tqf股票</title>
    <script src="https://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
    <script src="js/main.js"></script>
</head>
<body>
    <p class="g_title fix">内容列表
        <a class="btn03" href="http://localhost:63342/tqfframe/tqfframe-website/html/index.html">列表</a>&nbsp;&nbsp;&nbsp;&nbsp;
        <a class="btn03" href="http://localhost:63342/tqfframe/tqfframe-website/html/page/add.html">新增</a>
        <button style="float: right;" type="button"  class="btnOpt">每日K值计算</button>
        <b style=" float: right;padding-right: 50px;"  id="numberTxt"></b>
    </p>

</body>
<script type="text/javascript">
    var requestAdd = true;
    $(document).ready(function(){
        $(".btnOpt").click(function() {
            if (!requestAdd) {
                alert('请勿重复提交！');
                return;
            }
            if (requestAdd) {
                requestAdd = false;
                $.ajax({
                    type:"get",
                    url:url+"/executeK",
                    data:{},
                    success:function (data) {
                        alert(data.message)
                    }
                });
            }
        });

        $.ajax({
            type:"get",
            url:url+"/getProcessedNum",
            data:{},
            success:function (data) {
                document.getElementById("numberTxt").innerText="今天还剩："+data;
            }
        })

    });



</script>

</html>